3.709 \(\int \frac{A+B x}{x \sqrt{a^2+2 a b x+b^2 x^2}} \, dx\)

Optimal. Leaf size=80 \[ \frac{A \log (x) (a+b x)}{a \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{(a+b x) (A b-a B) \log (a+b x)}{a b \sqrt{a^2+2 a b x+b^2 x^2}} \]

[Out]

(A*(a + b*x)*Log[x])/(a*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) - ((A*b - a*B)*(a + b*x)*Log[a + b*x])/(a*b*Sqrt[a^2 +
2*a*b*x + b^2*x^2])

________________________________________________________________________________________

Rubi [A]  time = 0.0500902, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.069, Rules used = {770, 72} \[ \frac{A \log (x) (a+b x)}{a \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{(a+b x) (A b-a B) \log (a+b x)}{a b \sqrt{a^2+2 a b x+b^2 x^2}} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(x*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

(A*(a + b*x)*Log[x])/(a*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) - ((A*b - a*B)*(a + b*x)*Log[a + b*x])/(a*b*Sqrt[a^2 +
2*a*b*x + b^2*x^2])

Rule 770

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dis
t[(a + b*x + c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(f + g*x)*(b/2 + c
*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && EqQ[b^2 - 4*a*c, 0]

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rubi steps

\begin{align*} \int \frac{A+B x}{x \sqrt{a^2+2 a b x+b^2 x^2}} \, dx &=\frac{\left (a b+b^2 x\right ) \int \frac{A+B x}{x \left (a b+b^2 x\right )} \, dx}{\sqrt{a^2+2 a b x+b^2 x^2}}\\ &=\frac{\left (a b+b^2 x\right ) \int \left (\frac{A}{a b x}+\frac{-A b+a B}{a b (a+b x)}\right ) \, dx}{\sqrt{a^2+2 a b x+b^2 x^2}}\\ &=\frac{A (a+b x) \log (x)}{a \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{(A b-a B) (a+b x) \log (a+b x)}{a b \sqrt{a^2+2 a b x+b^2 x^2}}\\ \end{align*}

Mathematica [A]  time = 0.0208284, size = 44, normalized size = 0.55 \[ \frac{(a+b x) ((a B-A b) \log (a+b x)+A b \log (x))}{a b \sqrt{(a+b x)^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(x*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

((a + b*x)*(A*b*Log[x] + (-(A*b) + a*B)*Log[a + b*x]))/(a*b*Sqrt[(a + b*x)^2])

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 47, normalized size = 0.6 \begin{align*}{\frac{ \left ( bx+a \right ) \left ( Ab\ln \left ( x \right ) -A\ln \left ( bx+a \right ) b+B\ln \left ( bx+a \right ) a \right ) }{ba}{\frac{1}{\sqrt{ \left ( bx+a \right ) ^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x/((b*x+a)^2)^(1/2),x)

[Out]

(b*x+a)*(A*b*ln(x)-A*ln(b*x+a)*b+B*ln(b*x+a)*a)/((b*x+a)^2)^(1/2)/b/a

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/((b*x+a)^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.54205, size = 63, normalized size = 0.79 \begin{align*} \frac{A b \log \left (x\right ) +{\left (B a - A b\right )} \log \left (b x + a\right )}{a b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/((b*x+a)^2)^(1/2),x, algorithm="fricas")

[Out]

(A*b*log(x) + (B*a - A*b)*log(b*x + a))/(a*b)

________________________________________________________________________________________

Sympy [A]  time = 0.499915, size = 41, normalized size = 0.51 \begin{align*} \frac{A \log{\left (x \right )}}{a} + \frac{\left (- A b + B a\right ) \log{\left (x + \frac{- A a + \frac{a \left (- A b + B a\right )}{b}}{- 2 A b + B a} \right )}}{a b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/((b*x+a)**2)**(1/2),x)

[Out]

A*log(x)/a + (-A*b + B*a)*log(x + (-A*a + a*(-A*b + B*a)/b)/(-2*A*b + B*a))/(a*b)

________________________________________________________________________________________

Giac [A]  time = 1.13453, size = 66, normalized size = 0.82 \begin{align*} \frac{A \log \left ({\left | x \right |}\right ) \mathrm{sgn}\left (b x + a\right )}{a} + \frac{{\left (B a \mathrm{sgn}\left (b x + a\right ) - A b \mathrm{sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{a b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/((b*x+a)^2)^(1/2),x, algorithm="giac")

[Out]

A*log(abs(x))*sgn(b*x + a)/a + (B*a*sgn(b*x + a) - A*b*sgn(b*x + a))*log(abs(b*x + a))/(a*b)